PostFeedPortlet = Class.extend({
	init: function()	{
		this.name = "PostFeedPortlet";
	},
	
	onBegin: function()	{
		this.page = 0;
		this.registerObserver();
	},
	
	onPostNewFeed: function()	{
		var txt = this.requestForEffectiveResource('Input').val();
		var subject = SingletonFactory.getInstance(Subject);
		var obj = this;
		this.onAjax('feed', 'post-feed', {txt: txt}, 'POST', {
			'onSuccess': function()	{
			obj.requestForEffectiveResource('Input').val('');
				subject.notifyEvent('FeedsChanged');
			}
		});
	},
	
	run: function()	{
		this.getPortletPlaceholder().paintCanvas(this.render());
	},
	
	onEnd: function()	{
		this.unregisterObserver();
	}
}).implement(PortletInterface).implement(RenderInterface).implement(AjaxInterface).implement(ObserverInterface);